package com.hmkj.Utils.mail;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

public class MailAuthenticator extends Authenticator {
	private String UserName;
	private String KeyWord;

	public MailAuthenticator() {
	}

	public MailAuthenticator(String cUserName, String cKeyWord) {
		this.UserName = cUserName;
		this.KeyWord = cKeyWord;
	}

	/**
	 * 对用户和密码进行验证
	 */
	protected PasswordAuthentication getPasswordAuthentication() {
		return new PasswordAuthentication(this.UserName, this.KeyWord);
	}
}